#!/usr/bin/env python3

import multiprocessing as mp
import os
import time

def Run(c1, *args):
    print("child pid = ", os.getpid(), ", Run args: ", args)
    time.sleep(5)
    c1.send("hello")
    print("child exit....")


def main():
    print("main pid = ", os.getpid())

    c1, c2 = mp.Pipe()

    p = mp.Process(target=Run, args=(c1, 123, "kyo"))
    p.start()

    print("parent recv data: ", c2.recv())

if __name__ == "__main__":
    main()
